﻿<Window x:Class="LprMiddleWare.WPFAboutBox"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="{Binding RelativeSource={RelativeSource Self}, Mode=OneTime, Path=ProductTitle}" 
    x:Uid="idAboutBox"
    Style="{DynamicResource AboutDialogStyle}" WindowStartupLocation="CenterOwner" KeyUp="Window_KeyUp_1">
    <Window.Resources>
        <XmlDataProvider x:Key="aboutProvider" XPath="ApplicationInfo" IsAsynchronous="False" IsInitialLoadEnabled="True">
            <x:XData>
                <ApplicationInfo xmlns="">
                    <Link Uri="http://www.kise-tech.com">www.kise-tech.com</Link>
                </ApplicationInfo>
            </x:XData>
        </XmlDataProvider>
        <Style x:Key="AboutDialogStyle" TargetType="Window">
            <Setter Property="Height" Value="Auto" />
            <Setter Property="Width" Value="500" />
            <Setter Property="ShowInTaskbar" Value="False" />
            <Setter Property="ResizeMode" Value="NoResize" />
            <Setter Property="WindowStyle" Value="SingleBorderWindow" />
            <Setter Property="SizeToContent" Value="Height" />
        </Style>
        <Style x:Key="DisplayAreaStyle" TargetType="{x:Type StackPanel}">
            <Setter Property="Margin" Value="10,10,10,5" />
        </Style>
        <Style x:Key="BackgroundStyle" TargetType="{x:Type StackPanel}">
           
        </Style>
        <Style TargetType="Label">
            <Setter Property="Padding" Value="0" />
        </Style>
        <Style x:Key="ParagraphSeparator" TargetType="{x:Type Label}">
            <Setter Property="Padding" Value="0,10,0,0" />
        </Style>
        <Style x:Key="LinkLabelStyle">
            <Setter Property="Control.Padding" Value="0" />
            <Setter Property="Control.VerticalAlignment" Value="Center" />
        </Style>
        <Style x:Key="ReadOnlyDescStyle" TargetType="{x:Type TextBox}">
            <Setter Property="MinLines" Value="6" />
            <Setter Property="MaxLines" Value="6" />
            <Setter Property="IsReadOnly" Value="True" />
            <Setter Property="TextWrapping" Value="WrapWithOverflow" />
            <Setter Property="VerticalScrollBarVisibility" Value="Visible" />
        </Style>
        <Style x:Key="OkButtonStyle" TargetType="{x:Type Button}">
            <Setter Property="MinWidth" Value="75" />
            <Setter Property="Margin" Value="0,5" />
            <Setter Property="DockPanel.Dock" Value="Right" />
            <Setter Property="IsDefault" Value="True" />
            <Setter Property="IsCancel" Value="True" />
        </Style>
    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="auto" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Image Grid.Column="0" Width="80" Margin="10" Source="/LprMiddleWare;component/Images/Icons/Logo.png" VerticalAlignment="Top" />
        <StackPanel Grid.Column="1" x:Uid="clientArea" Style="{StaticResource BackgroundStyle}">
            <StackPanel Margin="10,20,10,10" x:Uid="displayArea" Style="{StaticResource DisplayAreaStyle}" 
                    DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Mode=OneTime}">
                <Label x:Name="productName" x:Uid="productName" 
                   Content="{Binding Mode=OneTime, Path=Product}" />
                <StackPanel x:Uid="versionArea" Orientation="Horizontal">
                    <Label x:Name="versionLabel" x:Uid="VersionLabel" Content="版本 - " MouseDoubleClick="onVersionDoubleClick" />
                    <Label x:Name="version" x:Uid="version" Content="{Binding Mode=OneTime, Path=Version}" />
                </StackPanel>
                <Label x:Name="copyright" x:Uid="copyright" Content="{Binding Mode=OneTime, Path=Copyright}" MouseDoubleClick="onCopyrightDoubleClick"  />
                <Label x:Name="reserved" x:Uid="reserved" Content="All Rights Reserved." />

                <DockPanel x:Uid="buttonArea">
                    
                    <Label x:Name="productLink" x:Uid="productLink" Style="{StaticResource LinkLabelStyle}" >
                        <Hyperlink x:Name="hyperlink" x:Uid="hyperlink" NavigateUri="{Binding Mode=OneTime, Path=LinkUri}"  Style="{StaticResource LinkLabelStyle}"
                               Hyperlink.RequestNavigate="hyperlink_RequestNavigate">

                        </Hyperlink>

                    </Label>
                </DockPanel>
            </StackPanel>
            <Button x:Name="okButton" x:Uid="okButton" Width="50" Style="{StaticResource OkButtonStyle}" 
                        Content="OK" HorizontalAlignment="Right" Margin="10,0,10,5" />
        </StackPanel>
    </Grid>
    
    
</Window>